//搜索商品

module.exports = (req, res) => {
    console.log(req.body);
    model.Product.find({
        name: req.body.ipt
    }).then(result => {
        console.log(result);
        res.send({
            code: "200",
            status: "405",
            msg: "商品查询成功",
            products:result
        })
    }).catch(() => {
        res.send({
            code: "200",
            status: "406",
            msg: "商品查询失败"
        })
    })
}